import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'linphone_flutter_method_channel.dart';
import 'linphone_chat_message.dart';

abstract class LinphoneFlutterPlatform extends PlatformInterface {

  /// Constructs a LinphoneFlutterPlatform.
  LinphoneFlutterPlatform() : super(token: _token);

  static final Object _token = Object();

  static LinphoneFlutterPlatform _instance = MethodChannelLinphoneFlutter();

  /// The default instance of [LinphoneFlutterPlatform] to use.
  ///
  /// Defaults to [MethodChannelLinphoneFlutter].
  static LinphoneFlutterPlatform get instance => _instance;
  
  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [LinphoneFlutterPlatform] when
  /// they register themselves.
  static set instance(LinphoneFlutterPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getLinphoneVersion() {
    throw UnimplementedError('getLinphoneVersion() has not been implemented.');
  }

  Future<void> login(String username, String password, String domain) {
    throw UnimplementedError('login() has not been implemented.');
  }

  void setCoreListener(LinphoneListener listener) {
    throw UnimplementedError('setCoreListener() has not been implemented.');
  }
  
  Future<void> unregister() {
    throw UnimplementedError('unregister() has not been implemented.');
  }

  Future<void> delete() {
    throw UnimplementedError('delete() has not been implemented.');
  }
  Future<void> terminate() {
    throw UnimplementedError('terminate() has not been implemented.');
  }

  Future<void> accept() {
    throw UnimplementedError('accept() has not been implemented.');
  }

  Future<void> outgoingCall(String remoteSipUri) {
    throw UnimplementedError('outgoingCall() has not been implemented.');
  }

  Future<void> hangUp() {
    throw UnimplementedError('hangUp() has not been implemented.');
  }

  Future<void> transferTo(String remoteSipUri) {
    throw UnimplementedError('transferTo() has not been implemented.');
  }

  Future<void> pauseOrResume() {
    throw UnimplementedError('pauseOrResume() has not been implemented.');
  }

  Future<bool?> micEnabled() {
    throw UnimplementedError('micEnabled() has not been implemented.');
  }

  Future<bool?> toggleSpeaker() {
    throw UnimplementedError('toggleSpeaker() has not been implemented.');
  }

  Future<String?> remoteAddressUri() {
    throw UnimplementedError('remoteAddressUri() has not been implemented.');
  }

  Future<String?> sendMessage(LinphoneChatMessage chatMessage) {
    throw UnimplementedError('sendMessage() has not been implemented.');
  }


  Future<bool?> requestPermissions() {
    throw UnimplementedError('requestPermissions() has not been implemented.');
  }
}
